package main;


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

import factory.FactoryImpl;
import factory.FactoryItf;

public class Server {

	public static void main(String[] args) {
		try {
			FactoryImpl obj = new FactoryImpl();
			FactoryItf stub = (FactoryItf) UnicastRemoteObject.exportObject(obj,0);		
			Registry registry = LocateRegistry.createRegistry(1099);
			registry.rebind("LaFactory", stub);
			System.out.println("Le server est pret ...");
		} catch (Exception e) {
		}
	}
}